package com.haidada.tk.controller;


import com.haidada.tk.service.UserService;
import com.haidada.tk.utils.ApiResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;





/**
 * 用户管理
 * @Date 2021-09-10 15:21
 * @Author Hai
 */
@RestController
@Api(tags = "用户管理")
@RequestMapping("hai/user")
public class UserController {

    @Autowired
    UserService userService;



    /**
     * 微信用户注册/登入
     * @return
     */
    @PostMapping("login")
    @ApiOperation(value = "注册/登入")
    public ApiResponse login(String openId){
        return userService.login(openId);
    }


}
